﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using CCWin;

namespace InterfaceView
{
    public partial class RMModify : CCSkinMain
    {
        public RMModify()
        {
            InitializeComponent();
        }

        private void RMModify_Load(object sender, EventArgs e)
        {
            skinDataGridView1.DataSource = BusinessLogic.RM.dgv();
        }

        private void skinButton1_modify_Click(object sender, EventArgs e)
        {
            string roomid = this.skinTextBox1_id.Text;
            string roomtype = this.skinTextBox2_type.Text;
            string roomprice = this.skinTextBox3_price.Text;

            if(BusinessLogic.RM.ModifyRoom(roomid,roomtype,roomprice)!=null)
            {
                MessageBox.Show("Have Modifyed already !");
                BusinessLogic.RM.updateroom();
                this.Close();
            }
        }



    }
}
